This application is based on patent application Nos. 9-267444, 9-267445, 9-267446, and 9-267447 filed in Japan, the contents of which is hereby incorporated by reference.
This invention relates to a color discriminating apparatus and method for discriminating the color of a sensed image using image data of color components of red, green, blue, etc.
A known method for discriminating colors of an image represented by an electrical signal is such that the colors are discriminated using normalized data of color component data constituting the image.
For example, Japanese Unexamined Patent Publication No. 5-48892 discloses a color discrimination method according to which specified threshold values c, m, y are set for image data C2, M2, Y2 of the respective color components of Cy (cyan), Mg (magenta), Ye (yellow) constituting an image and 8 colors can be discriminated against each other based on whether the image data C2, M2, Y2 are smaller or larger than the threshold values c, m, y. According to this method, the color of the image is discriminated to be black if all color components are smaller than the threshold values, while being discriminated to be a chromatic color when at least one color component is above at least one of the threshold values. In this method, however, it has been difficult to obtain an accurate chromatic-or-achromatic discrimination.
U.S. Pat. No. 5,377,019 discloses a color discrimination method using image data of color components R, G, B. Specifically, normalized data x(i) of respective image data (Xr, Xg, Xb) of three color components of red, green, blue is calculated in accordance with the equation x(i)=X(i)/(Xr+Xg+Xb) (i=r, g, b). As shown in FIG. 36, two (e.g., red and green) of the three color components are selected and the color is discriminated against each other based on the position P of normalized data (xr, xg) of the two color components in the xr-xg plane of the selected color components. However, this discrimination method uses first power normalized data, which consequently makes it difficult to provide a clear discrimination when a difference between color component data is small.
Japanese Unexamined Patent Publication No. 5-137011 discloses a method according to which a difference between a maximum value and a minimum value of each of image data Xr, Xg, Xb of color components R, G, B is calculated, the color of an image is discriminated to be achromatic if the calculation results are smaller than a specified threshold value while chromatic colors are discriminated against each other based on a combination determined by the relationship of the image data Xr, Xg, Xb in magnitude if the calculation results are above the specified threshold value. In the case of an achromatic color, whether it is black or white is further discriminated based on luminance information.
In the use of luminance information, geometric shapes such as characters and/or graphics as an image content influence the color discrimination if the discrimination threshold value is fixed. As a result, lines of an image may be thicker or thinner than those of actual characters or graphics. For example, if a threshold value is set high, graphics or the like drawn on a white board in order not to convert portions of characters or graphic defined by thin lines or having a low density into white portions, characters and/or graphics defined by lines of normal width come to be defined by thick lines. As a result, these characters and/or graphics are undesirably deformed. Conversely, if the threshold value is set low, portions of characters or graphic defined by thin lines or having a low density are converted into white portions. Consequently, the resulting image undesirably lacks an information such as characters.
Also, in the case of raising the chromatic color discrimination level but lowering the chromatic-or-achromatic discrimination level, an achromatic color is likely to be wrongly discriminated to be a chromatic color. If such wrong discrimination frequently occurs in a single color area, the appearance of the single color area becomes very poor. Accordingly, wrongly discriminated portions are required to be removed as noise. Conventionally, noise removal is performed based on a major discriminated color in a specified area. However, such removal is not applicable to the case that there are many noises.
It is an object of the present invention to provide a color discriminating apparatus and method which have overcome the problems residing in the prior art.
According to an aspect of the invention, a color discriminating apparatus comprises: a first calculator which calculates luminance information of a picked up color image based on image data of each of a plurality of color components constituting the color image; a second calculator which calculates color information of the color image based on image data; a first discriminator which discriminates, based on calculated color information, which the color image is chromatic or achromatic; a second discriminator which discriminates, based on calculated luminance information, which the color image is black or white when the color image is discriminated to be achromatic by the first discriminator; and a third discriminator which discriminates, based on the calculated color information and the calculated luminance information, which of a plurality of predetermined colors the color image agrees with when the color image is discriminated to be chromatic by the first discriminator.
According to another aspect of the invention, a color discriminating apparatus comprises: a calculator which calculates normalized data x(i) of image data X(i) (i=1,2, . . . n) of each of a plurality of color components in accordance with the equation:
x(i)=X(i)k/{X(1)k+X(2)k+ . . . X(n)k}(kxe2x89xa72),
each image data X(i) (i=1, 2, . . . n) constituting a picked up color image; and a color discriminator which discriminates the color of the color image based on calculated normalized data.
According to still another aspect of the invention, a color discriminating apparatus comprises: a luminance information calculator which calculates luminance information of each part of a picked up color image based on image data of a color component constituting the part of the color image; a color discriminator which discriminates which of colors the part of the color image has by comparing calculated luminance information with a discrimination reference; an area information generator which generates area information concerning which of a plurality of specified areas the part of the color image fall in; and a changer which changes the discrimination reference based on generated area information.
According to still yet aspect of the invention, a color discriminating apparatus comprises: a color discriminator which discriminates which of colors a part of a picked up color image has based on image data of each of a plurality of color components constituting the part of the color image; a color dispersion degree calculator which calculates a degree of color dispersion with respect to an extraction section consisting of a particular color discriminated part and a plurality of color discriminated parts surrounding the particular color discriminated part; a color dispersion degree discriminator which discriminates whether a calculated color dispersion degree is larger than a predetermined value; and a black allocater which allocates the color of black to the particular color discriminated part when the color dispersion degree is discriminated to be larger than the predetermined value.
According to further aspect of the invention, a method for discriminating the color of a picked up color image, comprises the steps of: calculating luminance information of a picked up color image based on image data of each of a plurality of color components constituting the color image; calculating color information of the color image based on image data; discriminating, based on calculated color information, which the color image is chromatic or achromatic; discriminating, based on calculated luminance information, which the color image is black or white when the color image is discriminated to be achromatic; and discriminating, based on the calculated color information and the calculated luminance information, which of a plurality of predetermined colors the color image agrees with when the color image is discriminated to be chromatic.
According to still further aspect of the invention, a method for discriminating the color of a picked up color image, comprises the steps of: calculating normalized data x(i) of image data X(i) (i=1,2, . . . n) of each of a plurality of color components in accordance with the equation:
x(i)=X(i)k/{X(1)k+X(2)k+ . . . X(n)k}(kxe2x89xa72),
each image data X(i) (i=1, 2, . . . n) constituting a picked up color image; and discriminating the color of the color image based on calculated normalized data.
According to yet still further aspect of the invention, a method for discriminating the color of a picked up color image, comprises the steps of: calculating luminance information of each part of a picked up color image based on image data of a color component constituting the part of the color image; discriminating which of colors the part of the color image has by comparing calculated luminance information with a discrimination reference; generating area information concerning which of a plurality of specified areas the part of the color image fall in; and changing the discrimination reference based on generated area information.
According to more further aspect of the invention, a method for discriminating the color of a picked up color image, comprises the steps of: discriminating which of colors a part of a picked up color image has based on image data of each of a plurality of color components constituting the part of the color image; calculating a degree of color dispersion with respect to an extraction section consisting of a particular color discriminated part and a plurality of color discriminated parts surrounding the particular color discriminated part; discriminating whether a calculated color dispersion degree is larger than a predetermined value; and allocating the color of black to the particular color discriminated part when the color dispersion degree is discriminated to be larger than the predetermined value.
These and other objects, features and advantages of the present invention will become more apparent upon a reading of the following detailed description and accompanying drawings.